<?php

/**
 * Description of AdminPresenter
 *
 * @author David Dusek
 */
class AdminPresenter extends BasePresenter {
    protected function startup() {
        parent::startup();
        
        // nastaveni layoutu pro administraci
        $this->setLayout("admin");
        $this->template->robots = "noindex,follow";
        
        // kontrola prihlaseni uzivatele
        if (!$this->user->loggedIn) {
            $this->flashMessage("Pro vstup do této sekce musíte být přihlášeni.", "error");
            $this->redirect("Administrace:default", array('backlink' => $this->storeRequest()));
        }
    }
}
